-
-
Notifications
You must be signed in to change notification settings - Fork 42
Manchester | 25-SDC-Nov | Geraldine Edwards | Sprint 1 | Individual-Shell-Tools #182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Manchester | 25-SDC-Nov | Geraldine Edwards | Sprint 1 | Individual-Shell-Tools #182
Conversation
| # If a line starts with a number and a space, make the line instead end with a space and the number. | ||
| # So line 6 which currently reads "37 Alisha" should instead read "Alisha 37". | ||
| # The output should contain 11 lines. | ||
| sed -E '/^[0-9]+ / s/^([0-9]+) (.*)/\2 \1/' input.txt No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this first ^[0-9]+ necessary here? What is it doing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yes I see, I'm not sure why it is there, I think I forgot to delete it when I was first building the command...and then when I ran bash it didn't cause an error so I have not noticed that it was still there...I have removed it now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You've comitted this by accident, can you revert it from this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
|
Good start on this sprint's tasks, I have spotted a few areas where you could improve code further |
…s in 'cat' exercises
…iles in 'wc' exercises
630ba69 to
e2ebd7f
Compare
|
This looks good now, well done |
Learners, PR Template
Self checklist
Changelist
This PR contains the answers to the shell script exercises in the awk, cat, grep, ls, sed, and wc directories of the individual-shell-tools directory
Questions
N/A